package com.zjy.software.javabase;

import java.util.Objects;

public class Student extends Person{
    public Student() {
        System.out.println("我是子类Student的构造方法______________________________________________");
    }
    public static void main(String[] args) {
        Student student = new Student();
        student.setName("zhangsan");
        System.out.println("student.getName() = " + student.getName());
        student.eat();
        Student myStudent=null;
        System.out.println("Objects.toString(student) = " + Objects.toString(myStudent));
        final int counter = 10;
//        counter=20;
    }

    @Override
    public void eat(){
        System.out.println("学生在食堂吃饭");
        System.out.println("------------------------------下面是其他人的吃饭----------------------------------");
        super.eat();
    }

    public void study( final int days){
        int counter=days;
        counter=20;
        System.out.println("days = " + days);
        System.out.println("学生在学习");
    }
@Override
    public String toString() {
        return Objects.toString(this);
    }

}
